x86/traps: prevent interleaving of concurrent cpu state dumps
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 11 Feb 2016 15:48:38 +0000 (16:48 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 11 Feb 2016 15:48:38 +0000 (16:48 +0100)
commit0996e0f38540beb13688e70b4b6f22e07aab2458
tree36d35abe9fa7dc12af4ba6fd5c01808e544afa7c
parent69a05748527e9cd236e169797dc771794dda372a
x86/traps: prevent interleaving of concurrent cpu state dumps

If two cpus enter show_execution_state() concurrently, the resulting console
output interleaved, and of no help debugging the situation further.

As calls to these locations are rare and usually important, it is acceptable
to serialise them.  These codepaths are also on the terminal error paths, so
the console lock must be the lock used for serialisation, to allow
console_force_unlock() to function properly.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/traps.c
xen/drivers/char/console.c
xen/include/xen/console.h